package com.zhang.zhangapp.bean.user;

import android.os.Parcel;
import android.os.Parcelable;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

/**
 * Created by Administrator on 2018/4/18.
 */
@Table(name = "z_search_history")
public class SearchHistory implements Parcelable{

    @Column(name = "id",isId = true)
    private int id ;
    @Column(name = "keyword")
    private String keyword;

    public SearchHistory(){
        super();
    }

    protected SearchHistory(Parcel in) {
        keyword = in.readString();
    }

    public static final Creator<SearchHistory> CREATOR = new Creator<SearchHistory>() {
        @Override
        public SearchHistory createFromParcel(Parcel in) {
            return new SearchHistory(in);
        }

        @Override
        public SearchHistory[] newArray(int size) {
            return new SearchHistory[size];
        }
    };

    public SearchHistory(String keyword) {
        this.keyword = keyword;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(keyword);
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }
}
